﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LYR_RPA.models.view
{
    // ViewModel.cs
    public class ViewModel : INotifyPropertyChanged
    {
        private string variable;
        private string backgroundColor;

        public string Variable
        {
            get { return Variable; }
            set
            {
                if (variable != value)
                {
                    variable = value;
                    OnPropertyChanged(nameof(Variable));
                }
            }
        }
        public string BackgroundColor
        {
            get { return BackgroundColor; }
            set
            {
                if (backgroundColor != value)
                {
                    backgroundColor = value;
                    OnPropertyChanged(nameof(BackgroundColor));
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }

}
